<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Pepr3D: pepr3d::ColorManager Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="pepr3d_icon.svg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Pepr3D
   &#160;<span id="projectnumber">v1.0</span>
   </div>
   <div id="projectbrief">Pepr3D is a 3D graphics editor designed for FDM printing</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpepr3d_1_1_color_manager.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classpepr3d_1_1_color_manager-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">pepr3d::ColorManager Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Represents a color palette, i.e., all colors and a selected active color.  
 <a href="classpepr3d_1_1_color_manager.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_color_manager_8h_source.html">ColorManager.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:adc519f02303d002bbc80e731ef3937eb"><td class="memItemLeft" align="right" valign="top"><a id="adc519f02303d002bbc80e731ef3937eb"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>ColorMap</b> = std::vector&lt; glm::vec4 &gt;</td></tr>
<tr class="separator:adc519f02303d002bbc80e731ef3937eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a224a83a4fd10df768ce5463366992fa9"><td class="memItemLeft" align="right" valign="top"><a id="a224a83a4fd10df768ce5463366992fa9"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ColorManager</b> (const ColorMap::const_iterator start, const ColorMap::const_iterator end)</td></tr>
<tr class="separator:a224a83a4fd10df768ce5463366992fa9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50c0362e45843f826984b86b4f5f7bf3"><td class="memItemLeft" align="right" valign="top"><a id="a50c0362e45843f826984b86b4f5f7bf3"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ColorManager</b> (const size_t number)</td></tr>
<tr class="separator:a50c0362e45843f826984b86b4f5f7bf3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6453cf533bb4bb251203bd599c48321"><td class="memItemLeft" align="right" valign="top"><a id="aa6453cf533bb4bb251203bd599c48321"></a>
glm::vec4&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_color_manager.html#aa6453cf533bb4bb251203bd599c48321">getColor</a> (const size_t i) const</td></tr>
<tr class="memdesc:aa6453cf533bb4bb251203bd599c48321"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the i-th color. <br /></td></tr>
<tr class="separator:aa6453cf533bb4bb251203bd599c48321"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a136ee5ee62632d6537377fccdc5ef9c6"><td class="memItemLeft" align="right" valign="top"><a id="a136ee5ee62632d6537377fccdc5ef9c6"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_color_manager.html#a136ee5ee62632d6537377fccdc5ef9c6">size</a> () const</td></tr>
<tr class="memdesc:a136ee5ee62632d6537377fccdc5ef9c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of currently used colors. <br /></td></tr>
<tr class="separator:a136ee5ee62632d6537377fccdc5ef9c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a439df566020a7f10221a4e4c3fd36e7d"><td class="memItemLeft" align="right" valign="top"><a id="a439df566020a7f10221a4e4c3fd36e7d"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_color_manager.html#a439df566020a7f10221a4e4c3fd36e7d">empty</a> () const</td></tr>
<tr class="memdesc:a439df566020a7f10221a4e4c3fd36e7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true iff no colors are currently used. <br /></td></tr>
<tr class="separator:a439df566020a7f10221a4e4c3fd36e7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb8aeb957d6a1cd5a79ebc0e246f5ca7"><td class="memItemLeft" align="right" valign="top"><a id="adb8aeb957d6a1cd5a79ebc0e246f5ca7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_color_manager.html#adb8aeb957d6a1cd5a79ebc0e246f5ca7">clear</a> ()</td></tr>
<tr class="memdesc:adb8aeb957d6a1cd5a79ebc0e246f5ca7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears all colors and becomes empty. <br /></td></tr>
<tr class="separator:adb8aeb957d6a1cd5a79ebc0e246f5ca7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ddc4ed221439f8b744b6d85b89127b3"><td class="memItemLeft" align="right" valign="top"><a id="a5ddc4ed221439f8b744b6d85b89127b3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_color_manager.html#a5ddc4ed221439f8b744b6d85b89127b3">addColor</a> (const glm::vec4 newColor)</td></tr>
<tr class="memdesc:a5ddc4ed221439f8b744b6d85b89127b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a new color if not above limit. <br /></td></tr>
<tr class="separator:a5ddc4ed221439f8b744b6d85b89127b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f11321a8da932e4bf9f7d9a83ecc7f1"><td class="memItemLeft" align="right" valign="top"><a id="a3f11321a8da932e4bf9f7d9a83ecc7f1"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_color_manager.html#a3f11321a8da932e4bf9f7d9a83ecc7f1">setColor</a> (const size_t i, const glm::vec4 newColor)</td></tr>
<tr class="memdesc:a3f11321a8da932e4bf9f7d9a83ecc7f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the i-th color to a new color. <br /></td></tr>
<tr class="separator:a3f11321a8da932e4bf9f7d9a83ecc7f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add375baf3a503d79d4922dbd360b62af"><td class="memItemLeft" align="right" valign="top"><a id="add375baf3a503d79d4922dbd360b62af"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_color_manager.html#add375baf3a503d79d4922dbd360b62af">replaceColors</a> (const ColorMap::const_iterator start, const ColorMap::const_iterator end)</td></tr>
<tr class="memdesc:add375baf3a503d79d4922dbd360b62af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Replace the current colors with this list, trims if above limit. <br /></td></tr>
<tr class="separator:add375baf3a503d79d4922dbd360b62af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2393992e48c2c6715ac33cb067d3dc75"><td class="memItemLeft" align="right" valign="top"><a id="a2393992e48c2c6715ac33cb067d3dc75"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_color_manager.html#a2393992e48c2c6715ac33cb067d3dc75">replaceColors</a> (const ColorMap &amp;newColors)</td></tr>
<tr class="memdesc:a2393992e48c2c6715ac33cb067d3dc75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Replace the current colors with this new vector of colors, trims if above limit. <br /></td></tr>
<tr class="separator:a2393992e48c2c6715ac33cb067d3dc75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3532df102b706a03bc0e23401c457e4f"><td class="memItemLeft" align="right" valign="top"><a id="a3532df102b706a03bc0e23401c457e4f"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_color_manager.html#a3532df102b706a03bc0e23401c457e4f">getActiveColorIndex</a> () const</td></tr>
<tr class="memdesc:a3532df102b706a03bc0e23401c457e4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets index of the currently selected / active color. <br /></td></tr>
<tr class="separator:a3532df102b706a03bc0e23401c457e4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81d621c28e948d1b3159dde1bcb73aea"><td class="memItemLeft" align="right" valign="top"><a id="a81d621c28e948d1b3159dde1bcb73aea"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_color_manager.html#a81d621c28e948d1b3159dde1bcb73aea">setActiveColorIndex</a> (size_t index)</td></tr>
<tr class="memdesc:a81d621c28e948d1b3159dde1bcb73aea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets index of the currently selected / active color, safely checks boundaries. <br /></td></tr>
<tr class="separator:a81d621c28e948d1b3159dde1bcb73aea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a928abdce32ef88875b11a370924a4fb4"><td class="memItemLeft" align="right" valign="top"><a id="a928abdce32ef88875b11a370924a4fb4"></a>
glm::vec4&#160;</td><td class="memItemRight" valign="bottom"><b>getActiveColor</b> () const</td></tr>
<tr class="separator:a928abdce32ef88875b11a370924a4fb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c86d46f583135d81ffe2842a8a2f8d1"><td class="memItemLeft" align="right" valign="top"><a id="a7c86d46f583135d81ffe2842a8a2f8d1"></a>
ColorMap &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>getColorMap</b> ()</td></tr>
<tr class="separator:a7c86d46f583135d81ffe2842a8a2f8d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acafb11f4d679dfe058c43ac3edc8a47c"><td class="memItemLeft" align="right" valign="top"><a id="acafb11f4d679dfe058c43ac3edc8a47c"></a>
const ColorMap &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>getColorMap</b> () const</td></tr>
<tr class="separator:acafb11f4d679dfe058c43ac3edc8a47c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a9c9dcef30e057653f1ecc55071fdf12c"><td class="memItemLeft" align="right" valign="top"><a id="a9c9dcef30e057653f1ecc55071fdf12c"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>generateColors</b> (const size_t colorCount, std::vector&lt; glm::vec4 &gt; &amp;outNewColors)</td></tr>
<tr class="separator:a9c9dcef30e057653f1ecc55071fdf12c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a3fc86df9e3fcb8ac2efaedcd0f180676"><td class="memTemplParams" colspan="2"><a id="a3fc86df9e3fcb8ac2efaedcd0f180676"></a>
template&lt;class Archive &gt; </td></tr>
<tr class="memitem:a3fc86df9e3fcb8ac2efaedcd0f180676"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>serialize</b> (Archive &amp;ar)</td></tr>
<tr class="separator:a3fc86df9e3fcb8ac2efaedcd0f180676"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:ad6b9cb7395ea796012aec61e6292cdfd"><td class="memItemLeft" align="right" valign="top"><a id="ad6b9cb7395ea796012aec61e6292cdfd"></a>
ColorMap&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_color_manager.html#ad6b9cb7395ea796012aec61e6292cdfd">mColorMap</a></td></tr>
<tr class="memdesc:ad6b9cb7395ea796012aec61e6292cdfd"><td class="mdescLeft">&#160;</td><td class="mdescRight">A vector containing all the colors that the application supports at this time. <br /></td></tr>
<tr class="separator:ad6b9cb7395ea796012aec61e6292cdfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29706f2b1a4d4870f4d9398c4830f9ec"><td class="memItemLeft" align="right" valign="top"><a id="a29706f2b1a4d4870f4d9398c4830f9ec"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_color_manager.html#a29706f2b1a4d4870f4d9398c4830f9ec">mActiveColorIndex</a> = 0</td></tr>
<tr class="memdesc:a29706f2b1a4d4870f4d9398c4830f9ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Index of a currently selected / active color. <br /></td></tr>
<tr class="separator:a29706f2b1a4d4870f4d9398c4830f9ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:ab2f44cbb59a08132f4c843e5225bba0e"><td class="memItemLeft" align="right" valign="top"><a id="ab2f44cbb59a08132f4c843e5225bba0e"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>cereal::access</b></td></tr>
<tr class="separator:ab2f44cbb59a08132f4c843e5225bba0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Represents a color palette, i.e., all colors and a selected active color. </p>
</div><hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/Home/MFF/1-Mgr/projekt/pepr3d/src/geometry/<a class="el" href="_color_manager_8h_source.html">ColorManager.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacepepr3d.html">pepr3d</a></li><li class="navelem"><a class="el" href="classpepr3d_1_1_color_manager.html">ColorManager</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
